import gameMapTemplateConfig from "@/pages/common/components/game-map-template-config/game-map-template-config.vue";
import ToolActionApi from "@/tool/http/tool-action.js";

let elementAction = ToolActionApi.init("game_element");
let mapTemplateAction = ToolActionApi.init("game_map_template");

const rule = {
	queryParams: [],
	formOnChange: (watchForm) => {
		return [];
	},
	pageConfig: {},
	metaConfig: {},
	extendFields: [
		{ memo: "地图配置", component: gameMapTemplateConfig }
	]
}

export default async function(metadata) {
	rule.metaConfig.element_id = {
		dictList: await elementAction.dict()
	}
	rule.metaConfig.map_template_id = {
		dictList: await mapTemplateAction.dict()
	}
	return rule;
}
